#include<stdio.h>
int fib(int k);
  int count=0;
int main()
{
    int n;
    scanf("%d", &n);
    printf("%d\n", fib(n));  
    printf("递归调用了%d次",count);
    return 0;
}

int fib(int k)
{
  
    if(k == 1 || k == 2)
   {
     count++;
        return 1;
   }
    else
    {
        count++;
return fib(k-1) + fib(k-2);
    }
       
}